﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/ViewMasterPage1.Master" Inherits="System.Web.Mvc.ViewPage<ComputerShopE3.Models.LAPTOP>" %>
<%@ Import Namespace="ComputerShopE3.Controllers" %> 

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Thông Tin Sản Phẩm</h2>
    <div>
        <% Html.RenderPartial("~/Views/Product/Details.ascx", ViewData["SAN_PHAM"]); %>
    </div>
    <fieldset>
        <legend>Thông tin laptop</legend>
        <p>
            CPU:
        </p>
        <p>
            <%=Html.ActionLink(Model.CPU.SAN_PHAM.TenSanPham, "Details", Model.CPU.SAN_PHAM.LOAI_SAN_PHAM.TenLoaiSanPham, new { id = Model.CPU.SAN_PHAM.id }, null)%>
        </p>
        <p>
            RAM:
        </p>
        <p>
            <%=Html.ActionLink(Model.RAM.SAN_PHAM.TenSanPham, "Details", Model.RAM.SAN_PHAM.LOAI_SAN_PHAM.TenLoaiSanPham, new { id = Model.RAM.SAN_PHAM.id }, null)%>
        </p>
        <p>
            VGA:
        </p>
        <p>
            <%=Html.ActionLink(Model.VGA.SAN_PHAM.TenSanPham, "Details", Model.VGA.SAN_PHAM.LOAI_SAN_PHAM.TenLoaiSanPham, new { id = Model.VGA.SAN_PHAM.id }, null)%>
        </p>
        <p>
            HDD:
        </p>
        <p>
            <%=Html.ActionLink(Model.HDD.SAN_PHAM.TenSanPham, "Details", Model.HDD.SAN_PHAM.LOAI_SAN_PHAM.TenLoaiSanPham, new { id = Model.HDD.SAN_PHAM.id }, null)%>
        </p>
        <p>
            MainBoard:
        </p>
        <p>
            <%=Html.ActionLink(Model.MAINBOARD.SAN_PHAM.TenSanPham, "Details", Model.MAINBOARD.SAN_PHAM.LOAI_SAN_PHAM.TenLoaiSanPham, new { id = Model.MAINBOARD.SAN_PHAM.id }, null)%>
        </p>
        <p>
            HDH:
        </p>
        <p>
            <%=Html.ActionLink(Model.HDD.SAN_PHAM.TenSanPham, "Details", Model.HE_DIEU_HANH.SAN_PHAM.LOAI_SAN_PHAM.TenLoaiSanPham, new { id = Model.HE_DIEU_HANH.SAN_PHAM.id }, null)%>
        </p>
        <p>
            SoundCard:
        </p>
        <p>
            <%=Html.ActionLink(Model.CPU.SAN_PHAM.TenSanPham, "Details", Model.SOUND_CARD.SAN_PHAM.LOAI_SAN_PHAM.TenLoaiSanPham, new { id = Model.SOUND_CARD.SAN_PHAM.id }, null)%>
        </p>
        <p>
            CD_DVD:
        </p>
        <p>
            <%=Html.ActionLink(Model.CD_DVD.SAN_PHAM.TenSanPham, "Details", Model.CD_DVD.SAN_PHAM.LOAI_SAN_PHAM.TenLoaiSanPham, new { id = Model.CD_DVD.SAN_PHAM.id }, null)%>
        </p>
        <p>
            ScreenSize:
        </p>
        <p>
            <%= Html.Encode(String.Format("{0:F}", Model.ScreenSize)) %>
        </p>
        <p>
            <%=Html.ActionLink(Model.PIN.SAN_PHAM.TenSanPham, "Details", Model.CPU.SAN_PHAM.LOAI_SAN_PHAM.TenLoaiSanPham, new { id = Model.PIN.SAN_PHAM.id }, null)%>
        </p>
        <p>
            Khối lượng
        </p>
        <p>
            <%= Html.Encode(String.Format("{0:F}", Model.KhoiLuong)) %>
        </p>
    </fieldset>
    <p>
        
        <% SiteRoles role = SpiderE3AuthorizeAttribute.GetCurrentRole(Context);
            if (role == SiteRoles.Admin || role == SiteRoles.Employee || (role == SiteRoles.Member && Model.LaSanPhamCustom == true))
           { %>
        <%=Html.ActionLink("Chỉnh sửa", "Edit", new { id = Model.id })%> |
        <%} %>
        <%=Html.ActionLink("Trở lại danh mục", "Index") %>
    </p>
    <div>
        <% Html.RenderPartial("BottomProductPartialView"); %>
    </div>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
    <title>Laptop</title>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="PersonalMenu" runat="server">
</asp:Content>

